CC = gcc
target=test
SRC = ${wildcard  *.c} 
OBJ = $(patsubst %.c, %.o, ${SRC})
CFLAGS += -w
CLIBS += -L /usr/local/lib/ffmpeg4.2/ -lavformat -lavcodec -lswscale -lavdevice -lavutil -lavfilter -lswresample -lm -lz
INC += -I /usr/local/include/ffmpeg4.2/
${target}: ${OBJ}
	@${CC} ${OBJ} -o $@ $(CLIBS)
$(OBJ):%.o:%.c
	@$(CC) ${CFLAGS} -c $< -o $@ $(INC) $(CLIBS)
clean:
	@rm -f ${OBJ}
	@rm -f *.o
	@rm -f *~
	@rm -f test
